package com.itcast.service.impl;

import com.itcast.dao.AccountMapper;
import com.itcast.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl implements AccountService {
    public void update(int i) {
        System.out.println("修改了...." + i);
    }

    public void find() {
        System.out.println("已经发现了很多......");
    }

    @Autowired
    private AccountMapper accountMapper ;

    public void transfer(String sname, String tname, Double money){
        accountMapper.outCount(money,sname);

//        int i = 10/0;
        accountMapper.inCount(money,tname);
    }
}
